package com.haha.config;

/**
 * @author zouwz5
 * @date 2025/10/8 16:03
 */

import com.haha.lock.DistributedLock;
import com.haha.lock.RedissonDistributedLock;
import org.redisson.api.RedissonClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

@Configuration
public class LockConfig {
    @Primary
    @Bean
    public DistributedLock redissonDistributedLock(RedissonClient redissonClient){
        return new RedissonDistributedLock(redissonClient);
    }
}
